package com.lifeng.zk.zkclient.watch;

import org.I0Itec.zkclient.IZkStateListener;
import org.apache.zookeeper.Watcher;


/**
 * Created by lifeng on 2018/6/14.
 * 状态的变化
 */
public class MyStateWatcher implements IZkStateListener{

    public void handleStateChanged(Watcher.Event.KeeperState keeperState) throws Exception {
        System.out.println("状态变化:"+keeperState);
    }

    public void handleNewSession() throws Exception {
        System.out.println("新的session");
    }

    public void handleSessionEstablishmentError(Throwable throwable) throws Exception {
        System.out.println("handleSessionEstablishmentError");
    }
}
